﻿var config = {};

// 数据库配置
config.db = {
  host      : '120.76.77.123',
  port      : '3306',
  database  : 'iseeu',
  user      : 'iseeu',
  password  : 'iseeyou@!^0987',
  charset   : 'UTF8'
};
// 系统配置
config.main = {
  url  : 'http://mytest.ubernihao.com',
  projectDir: 'D://nodework/workspace/I-See-U/',
  //文件目录
  fileUploadPath : 'd://nodework/workspace/upload/',
  //ng根目录
  nginxIndexPath : '/dev/dir/',
  fileDomain : 'http://',
  //dev:开发模式，文件上传到工程根目录下的public目录, prov:生产模式，文件上传到nginx的文件根目录
  fileDebugType : 'prov'
};

// redis地址
config.redis = {
    host : '112.125.94.250',
    port : 6379,
    password : '',
    database : ''
};

// 微信配置
config.wechat = {
	accessTokenUrl :'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={appid}&secret={appsecret}',
	jsTicketUrl : 'https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token={accesstoken}&type=jsapi',
    fansUrl : 'https://api.weixin.qq.com/cgi-bin/user/info?access_token={access_token}&openid={openid}&lang=zh_CN',
    //授权跳转地址
    authUrl:'https://open.weixin.qq.com/connect/oauth2/authorize?appid={appid}&redirect_uri={redirect_uri}&response_type=code&scope={scope}&state={state}#wechat_redirect',
    //微信验证跳转路径
    redirectUri:'/wechat/auth',
    userScope:'snsapi_userinfo',
    baseScope:'snsapi_base',
    snsFansUrl:'https://api.weixin.qq.com/sns/userinfo?access_token={access_token}&openid={openid}&lang=zh_CN',
    //code换取access_token
    auth2TokenUrl:'https://api.weixin.qq.com/sns/oauth2/access_token?appid={appid}&secret={appsecret}&code={code}&grant_type=authorization_code',
    verifyAuthToken:'https://api.weixin.qq.com/sns/auth?access_token={access_token}&openid={openid}',
    subscribeContent : '多谢关注拇指部落！',
    messageMainUrl : 'api.weixin.qq.com',
    messagePathUrl : '/cgi-bin/message/biz/send?access_token={access_token}',
    defaultAccountId : 8,
    type : 'text'
};

// 微信配置
config.en_wechat = {
    gettokenUrl : 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid={id}&corpsecret={secrect}',
    jsTicketUrl : 'https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token={accesstoken}&type=jsapi',
    fansUrl : 'https://api.weixin.qq.com/cgi-bin/user/info?access_token={access_token}&openid={openid}&lang=zh_CN',
    //授权跳转地址，获取code
    authUrl:'https://open.weixin.qq.com/connect/oauth2/authorize?appid={appid}&redirect_uri={redirect_uri}&response_type=code&scope={scope}&state={state}#wechat_redirect',
    //根据code获取成员信息
    getuserinfoUrl:'https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token={ACCESS_TOKEN}&code={CODE}',

    //微信验证跳转路径
    redirectUri:'/wechat/auth',
    //获取企业的UserId并且包括详细信息
    userScope:'snsapi_userinfo',
    //获取企业的UserId
    baseScope:'snsapi_base',
    snsFansUrl:'https://api.weixin.qq.com/sns/userinfo?access_token={access_token}&openid={openid}&lang=zh_CN',
    //code换取access_token
    auth2TokenUrl:'https://api.weixin.qq.com/sns/oauth2/access_token?appid={appid}&secret={appsecret}&code={code}&grant_type=authorization_code',
    verifyAuthToken:'https://api.weixin.qq.com/sns/auth?access_token={access_token}&openid={openid}',
    subscribeContent : '多谢关注拇指部落！',
    messageMainUrl : 'api.weixin.qq.com',
    messagePathUrl : '/cgi-bin/message/biz/send?access_token={access_token}',
    defaultAccountId : 9,
    type : 'text'
};

/*
启动：NODE_ENV=production PORT=80 NODE_TLS_REJECT_UNAUTHORIZED=0 forever -a -l /home/m_muzhibuluo/m_muzhibuluo/m_muzhibuluo.log start /home/m_muzhibuluo/m_muzhibuluo/bin/www
重启：NODE_ENV=production PORT=80 NODE_TLS_REJECT_UNAUTHORIZED=0 forever -a -l /home/m_muzhibuluo/m_muzhibuluo/m_muzhibuluo.log restart /home/m_muzhibuluo/m_muzhibuluo/bin/www
停止：NODE_ENV=production PORT=80 NODE_TLS_REJECT_UNAUTHORIZED=0 forever -a -l /home/m_muzhibuluo/m_muzhibuluo/m_muzhibuluo.log stop /home/m_muzhibuluo/m_muzhibuluo/bin/www
*/

module.exports = config;
